package interview;

public class interview_16_11 {
    public int[] divingBoard(int shorter, int longer, int k) {
        if(k==0) return new int[0];
        if(longer==shorter) {
            return new int[]{k*longer};
        }
        int[] num=new int[k+1];
        for(int i=0;i<k+1;++i){
            num[i]=i*longer+(k-i)*shorter;
        }
        return num;
    }
}
